
#include "xdns-header-info.h"

XdnsHeaderInfo::XdnsHeaderInfo()
: m_qr(false),
  m_aa(false),
  m_tc(false),
  m_rd(false),
  m_ra(false),
  m_opcode(0),
  m_z(0),
  m_rcode(0),
  m_id(0),
  m_qdcount(0),
  m_ancount(0),
  m_nscount(0),
  m_arcount(0)
{
}

XdnsHeaderInfo::XdnsHeaderInfo(const XdnsHeaderInfo& anotherInfo)
: m_qr(anotherInfo.m_qr),
  m_aa(anotherInfo.m_aa),
  m_tc(anotherInfo.m_tc),
  m_rd(anotherInfo.m_rd),
  m_ra(anotherInfo.m_ra),
  m_opcode(anotherInfo.m_opcode),
  m_z(anotherInfo.m_z),
  m_rcode(anotherInfo.m_rcode),
  m_id(anotherInfo.m_id),
  m_qdcount(anotherInfo.m_qdcount),
  m_ancount(anotherInfo.m_ancount),
  m_nscount(anotherInfo.m_nscount),
  m_arcount(anotherInfo.m_arcount)
{
}

XdnsHeaderInfo::~XdnsHeaderInfo()
{
}

XdnsHeaderInfo&
XdnsHeaderInfo::operator=(const XdnsHeaderInfo& anotherInfo)
{
    this->m_qr = anotherInfo.m_qr;
    this->m_aa = anotherInfo.m_aa;
    this->m_tc = anotherInfo.m_tc;
    this->m_rd = anotherInfo.m_rd;
    this->m_ra = anotherInfo.m_ra;
    this->m_opcode = anotherInfo.m_opcode;
    this->m_z = anotherInfo.m_z;
    this->m_rcode = anotherInfo.m_rcode;
    this->m_id = anotherInfo.m_id;
    this->m_qdcount = anotherInfo.m_qdcount;
    this->m_ancount = anotherInfo.m_ancount;
    this->m_nscount = anotherInfo.m_nscount;
    this->m_arcount = anotherInfo.m_arcount;

    return (*this);
}

